﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PoliAsis.Domain
{
    public class DbName : Attribute
    {
        public string name;
        public DbName(string name)
        {
            this.name = name;
        }
    }

    public enum SEARCH_MODE
    {
        SEARCH_CONTAINS,
        SEARCH_BEGINS_WITH,
        SEARCH_ENDS_WITH
    }
    public enum EXECUTE_MODE
    {
        SINGLE_INSERT,
        DATA_TABLE_INSERT,
        SINGLE_UPDATE,
        MULTIPLE_UPDATE,
        SINGLE_DELETE,
        MULTIPLE_DELETE,
        SELECT,
        SELECT_MANY,
        SELECT_PAGING,
        SEARCH_PAGING
    }

    [AttributeUsage(AttributeTargets.Class)]
    public class TableKey : Attribute
    {
        public List<string> key_list { get; set; }
        public TableKey(string keys_csep)
        {
            string[] l = keys_csep.Split(',');
            key_list = l.ToList();
        }
    }

    public enum FORM_STATE
    {
        DEFAULT,
        PARENT_GRID_CHANGED,
        OBJECT_SAVED,
        OBJECT_DELETED,
        OBJECT_UPDATED
    }
}
